<?php
/**
 * The edit view of company module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Chunsheng Wang <chunsheng@cnezsoft.com>
 * @package     company
 * @version     $Id: edit.html.php 4713 2013-05-02 08:04:38Z chencongzhi520@gmail.com $
 * @link        http://www.zentao.net
 */
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/kindeditor.html.php'; ?>
<style>
    .main-content {
        padding: 0px;
    }
</style>
    <div id='mainContent' class='main-content'>
        <div class='main-header'>
            <h2>
                <?php
                if (!empty($approval->code)):
                    echo $lang->approval->edit . $lang->approval->common;
                else:
                    echo $lang->approval->create . $lang->approval->common;
                endif;
                ?>
            </h2>
        </div>
        <form class='main-form' id="approval" method='post' target='hiddenwin'>
            <table class='table table-form'>
                <caption>基本信息</caption>
                <tr>
                    <th><?php echo $lang->approval->project; ?></th>
                    <td colspan="3">
                        <?php echo html::input('project', $approval->project, 'class="form-control "'); ?>
                        <?php
                            if (!empty($approval->id) && !empty($approval->code)) {
                        ?>
                        <input type="hidden" id="id" name="id" value="<?php echo $approval->id; ?>">
                        <input type="hidden" id="code" name="code" value="<?php echo $approval->code; ?>">
                        <?php
                            }
                        ?>
                    </td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->leader; ?></th>
                    <td><?php echo html::select('leader', $users, $approval->leader, "class='form-control chosen'"); ?></td>
                    <th><?php echo $lang->approval->apply; ?></th>
                    <td>
                        <div class='datepicker-wrapper datepicker-date'><?php echo html::input('approvalDate', $approval->apply, "class='form-control' style='padding-right:10px'"); ?></div>
                    </td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->begin; ?></th>
                    <td>
                        <div class='datepicker-wrapper datepicker-date'><?php echo html::input('beginDate', $approval->begin, "class='form-control' style='padding-right:10px'"); ?></div>
                    </td>
                    <th><?php echo $lang->approval->end; ?></th>
                    <td>
                        <div class='datepicker-wrapper datepicker-date'><?php echo html::input('endDate', $approval->end, "class='form-control' style='padding-right:10px'"); ?></div>
                    </td>
                </tr>

                <tr>
                    <th><?php echo $lang->approval->leaderGroup; ?></th>
                    <td><?php echo html::select('dept', $depts, $approval->leaderGroup, "class='form-control chosen'"); ?></td>
                    <th><?php echo $lang->approval->counterpart; ?></th>
                    <td><?php echo html::input('counterpart', $approval->counterpart ? $approval->counterpart : '', "class='form-control'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->budget; ?></th>
                    <td>
                        <div class="input-group">
                            <?php echo html::number('budget', $approval->budget ? ($approval->budget) : '', "class='form-control' min='0'"); ?>
                            <span class="input-group-addon">元</span>
                        </div>
                    </td>
                    <th><?php echo $lang->approval->number; ?></th>
                    <td>
                        <div class="input-group">
                            <?php echo html::number('number', $approval->number ? $approval->number : '', "class='form-control' min='0'"); ?>
                            <span class="input-group-addon">人</span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->remarks; ?></th>
                    <td colspan="3"><?php echo html::textarea('remarks', html_entity_decode($approval->remarks,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
            </table>
            <table class='table table-form'>
                <caption>项目背景及研发内容</caption>
                <tr>
                    <th class="w-100px"><?php echo $lang->approval->project; ?></th>
                    <td colspan="3"><span class="approvalProjectName"><?php echo $approval->project; ?></span></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->marketDemand; ?></th>
                    <td colspan="3"><?php echo html::textarea('marketDemand', html_entity_decode($approval->marketDemand,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->content; ?></th>
                    <td colspan="3"><?php echo html::textarea('content', html_entity_decode($approval->content,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->indicators; ?></th>
                    <td colspan="3"><?php echo html::textarea('indicators', html_entity_decode($approval->indicators,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->difficulties; ?></th>
                    <td colspan="3"><?php echo html::textarea('difficulties', html_entity_decode($approval->difficulties,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->opponent; ?></th>
                    <td colspan="3"><?php echo html::textarea('opponent', html_entity_decode($approval->opponent,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
            </table>
            <table class='table table-form'>
                <caption>评审依据</caption>
                <tr>
                    <th class="w-100px"><?php echo $lang->approval->project; ?></th>
                    <td colspan="3"><span class="approvalProjectName"><?php echo $approval->project; ?></span></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->strategic; ?></th>
                    <td colspan="3"><?php echo html::textarea('strategic', html_entity_decode($approval->strategic,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->feasibility; ?></th>
                    <td colspan="3"><?php echo html::textarea('feasibility', html_entity_decode($approval->feasibility,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->market; ?></th>
                    <td colspan="3"><?php echo html::textarea('market', html_entity_decode($approval->market,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->strategy; ?></th>
                    <td colspan="3"><?php echo html::textarea('strategy', html_entity_decode($approval->strategy,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->productionConditions; ?></th>
                    <td colspan="3"><?php echo html::textarea('productionConditions', html_entity_decode($approval->productionConditions,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->resourceAllocation; ?></th>
                    <td colspan="3"><?php echo html::textarea('resourceAllocation', html_entity_decode($approval->resourceAllocation,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>
                <tr>
                    <th><?php echo $lang->approval->competitiveAdvantage; ?></th>
                    <td colspan="3"><?php echo html::textarea('competitiveAdvantage', html_entity_decode($approval->competitiveAdvantage,ENT_QUOTES, 'UTF-8'), "rows=5 class='form-control kindeditor' hidefocus='true'");; ?></td>
                </tr>

                <tr>
                    <td class='text-center' colspan='4'>
                        <?php echo html::submitButton(); ?>
                        <?php echo html::backButton(); ?>
                    </td>
                </tr>
            </table>
        </form>
    </div>

<?php include '../../common/view/footer.html.php'; ?>